home *** CD-ROM | disk | FTP | other *** search
- (* Written by Dan Glanz, Alexandria, Virginia (76672,2572), May, 1989. *)
- (* as a public service. *)
- (* There are no restrictions on use and no gaurantees that it works. *)
-
- (* All I ask is a smidgeon of credit. *)
- (* If you include this in a program, leave the credit line in. *)
- (* If you modify the unit, add your own credit line. *)
-
- (* This is a Turbo Pascal 5.0 unit designed to allow reading and writing
- of Lotus 1-2-3, Symphony, VP-Planner and other such files using the
- Lotus 1-2-3 file format.
-
- ************** update information ***************
-
- This version is updated to allow reading and writing of range names and
- extents and column widths. The structure of the "Lotus_Record_Type" has
- been modified to variant records for efficiency in data storage.
-
- **************************************************
-
- Lotus 1-2-3 uses 8 byte reals (TP's double's). Any program using
- Lotus 1-2-3 data must either use a math coprocessor {$N+} or
- coprocessor emulation {$N+,E+}
-
- For demonstration purposes, a separate program called TEST123
- is included in the ARC file.
-
- It reads any Lotus format file and copies out label, integer, real
- column width, range identification and the current value of formula cells
- to a file in the same directory with the same name but with an extension
- of '.WK!' It does not copy formulas and other such information.
- It is primarily designed to allow access to the DATA. However, it
- does read column widths, and range names and extents.
-
- Take note that Lotus rows and columns are numbered starting with 0.
- that is Column A is 0 and Row 1 is 0.
-
- Lotus_Version is set up as a typed constant as if the file were
- a Lotus version 1.0 or 1a type file. Change it if you need to.
- The program automatically writes a version record at the beginning of
- the file when the file is opened for writing by calling
- Open_Lotus_Write_File. It must do this or Lotus 1-2-3 will not
- allow use of the file. If you have used Open_Lotus_Read_File to open
- a file to be copied or accessed, then the version of that file is
- substituted for the default Lotus_Version.
-
- If you want to use the unit to create a Lotus formatted file directly,
- you must provide the row and column of the data in Lotus.Row and
- Lotus.Column (starting with row 0 and column 0), define the format
- in Lotus.Format (default seems to be 255) set the value in either
- Lotus.Integer_Value, Lotus.Real_Value, Lotus.Column_Width, or
- Lotus.Range_Name, Range_Start Column, etc., or Lotus.Label_Value.
- Then set Lotus.Cell_Type := to Integer_Type, Real_Type, Column_Width_Type,
- RAnge_Type or Label_Type as the case may be and call Write_Lotus_Record.
-
- Note: When you write your own labels in Label_Value, make sure you put
- a ' or " or ^ as the first character of the string. Also, you may be
- able to include formulas in a worksheet you are creating by writing out
- a label cell containing with the formula and then deleting
- the ', ", or ^ in the spreadsheet itself, perhaps by using a macro.
-
- When you call Close_Lotus_Write_File, an end of file record is written
- and the file is automatically closed.
-
- Lotus 1-2-3 is a trademark of Lotus Corporation.
-
- *) {That's the End of Dan's original comments}
-
- {*****************************************************}
- {* *}
- {* Updated by RGMinutillo to serve as a Delphi unit *}
- {* July 1, 1995 *}
- {* *}
- {*****************************************************}
-
- {
-
- I cleaned out the CRT routines for displaying the cells, and the
- file name routines. I also provide a different demo file.
-
- I've kept the Dan Glanz' concept of the all inclusive record-type, but
- the unit could also have been 'parameterized' by making each routine
- expect parameters which matched the specific structure of each 123 record
- type. I also could have added error/range checking, but that would be
- too much like work. I have added some elements to the Lotus record type
- definition to allow for some more 123 record types: specifically, I have
- added:
-
- PrintRange
- PrintSetupString
- PrintMargins
- GlobalProtection (byte: 0 for off and 1 for on)
- ActiveRange
-
- .
- I needed those to reproduce a VB program I've been converting. Lotus
- published all of the record types and record formats for the original
- WK1 and Symphony format, so it's reasonably easy to add some of the
- more exotic WK1 records like Query Range, Data Range, etc. Parsing
- formulae remains a challenge, however, since they are tokenized. If it's
- a simple formula with relative cell references, create it in a spreadsheet,
- then read it and capture the string of tokens, and hard code it. (Ugh!,
- but see demo.) Another problem with tokenized formulae is that they can
- exceed the 512 byte length this unit expects.
-
- Some useful Lotus.Format bytes values are
- 128-143: protected fixed 0 tp 15 decimal places
- 144-159: protected scientific 0 to 15 decimal places
- 160-175: protected currency 0 t 15 decimal places
- 176-191: protected decimal 0 to 15 decimal places
- 192-207: protected comma 0 to 15 decimal places
- subtract 128 for unprotected
-
- Although elegant in many ways, this is a very crude implementation by
- OOPS standards, since it is not 'object'ified in any way. Still, it
- does basic WK1 reading and writing, which was what I was looking for.
- Thanks Dan.
-
- I've also included the TEST123P project, with the DEMO123 Unit, which
- reads and displays WK1 files, shows how to thoroughly de-code the
- Lotus.format byte, and writes a demo file.}
-
- Unit Unit123;
- Interface
-
- uses Dialogs;
-
- Const
- Lotus_Version : integer = 1028; {1028 for Lotus 1}
- {1029 for Symphony 1.0}
- {1030 for Lotus 2 & Symphony 1.1}
-
- Type
- Lotus_Cell_Type = (Version_Type, End_Of_File_Type, Blank_Type,
- Integer_Type, Real_Type, Label_Type,
- Formula_Type, Unidentified_Type, Range_Type,
- Column_Width_Type, Protection_Type,
- ARange_Type, PRange_Type, Print_Setup_Type, PMargins_Type);
-
- Lotus_Record_Type =
- Record
- Cell_Type_Code : Integer;
- Cell_Length : Integer;
- Format : Byte;
- Column : integer;
- Row : integer;
- Cell_Type : Lotus_Cell_Type;
- Alpha_Column : String[8];
- case integer of
- 6: (ARange_Start_Column : integer;
- ARange_Start_Row : integer;
- ARange_End_Column : integer;
- ARange_End_Row : integer;
- Alpha_ARange_Start : string;
- Alpha_ARange_End : String);
- 8: (Column_Width : Byte);
- 11: (Range_Name : string[16];
- Range_Start_Column : integer;
- Range_Start_Row : integer;
- Range_End_Column : integer;
- Range_End_Row : integer;
- Alpha_Range_Start : string;
- Alpha_Range_End : String);
- 13: (Integer_Value : integer);
- 14: (Real_Value : double);
- 15: (Label_Value : string;
- Zero: byte);
- 16: (Formula_Value : double;
- Formula_Length : integer;
- Formula : array [0 .. 255] of byte);
- 26: (PRange_Start_Column : integer;
- PRange_Start_Row : integer;
- PRange_End_Column : integer;
- PRange_End_Row : integer;
- Alpha_PRange_Start : string;
- Alpha_PRange_End : String);
- 36: (Protection_Value : Byte);
- 39: (Print_Setup_Value : string[40]);
- 40: (PMargins_left : integer;
- PMargins_Right : integer;
- PMargins_Page_Lines : integer;
- PMargins_Top : integer;
- PMargins_Bottom : integer);
- 255: (Unidentified : array [0 .. 511] of byte);
- end; {case}
- var
- Lotus_Read_File_Name : String;
- Lotus_Read_File : file;
- Lotus_Write_File_Name : String;
- Lotus_Write_File : file;
- Lotus_End_Of_File : boolean;
- Lotus_Version_Name : string;
- Lotus : Lotus_Record_Type;
-
- Procedure Open_Lotus_Read_File;
- Procedure Get_Version_Name;
- Procedure Get_Alpha_Column(var Alpha_Column_ID : String; Column_Number, Row_Number:integer);
- Procedure Read_Type_and_Length;
- Procedure Read_Format_Info;
- Procedure Read_Lotus_Record;
- Procedure Close_Lotus_Read_File;
- Procedure Open_Lotus_Write_File;
- Procedure Write_Type_and_Length;
- Procedure Write_Format_Info;
- Procedure Write_Lotus_Record;
- Procedure Close_Lotus_Write_File;
-
- implementation
-
- (****************************************************************)
- (****************************************************************)
-
- Procedure Read_Type_and_Length; {Could be changed to a single }
- {BlockRead since Cell_Type_Code}
- {Cell_Length are adjacent in the record}
- {definition and on the file.}
- begin
- BlockRead(Lotus_Read_File, Lotus.Cell_Type_Code, 2);
- BlockRead(Lotus_Read_File, Lotus.Cell_Length, 2);
- end;
-
- (****************************************************************)
-
- Procedure Write_Type_and_Length; {Could be changed to a single }
- {BlockWrite since format, column}
- {and row are adjacent in the record}
- {definition and on the file.}
- begin
- BlockWrite(Lotus_Write_File, Lotus.Cell_Type_Code, 2);
- BlockWrite(Lotus_Write_File, Lotus.Cell_Length, 2);
- end;
-
- (****************************************************************)
-
- Procedure Get_Alpha_Column(var Alpha_Column_ID : String; Column_Number, Row_Number:integer);
- Var
- First_Char : char;
- Second_Char : char;
- Row_String : string[6];
- Begin
- First_Char := char(64 + Column_Number div 26);
- Second_Char := char(65 + Column_Number -((byte(First_Char)-64) * 26));
- If First_Char = #64 then First_Char := #32;
- Str(Row_Number + 1, Row_String);
- Alpha_Column_ID := First_Char + Second_Char + Row_String;
- end;
-
-
- (****************************************************************)
-
- Procedure Read_Format_Info; {Could be changed to a single }
- {BlockRead since format, column}
- {and row are adjacent in the record}
- {definition and on the file.}
- Var
- Alpha_Column_ID : string;
-
- begin
- BlockRead(Lotus_Read_File, Lotus.Format, 1);
- BlockRead(Lotus_Read_File, Lotus.Column, 2);
- BlockRead(Lotus_Read_File, Lotus.Row, 2);
-
- Get_Alpha_Column(Alpha_Column_ID, Lotus.Column, Lotus.Row);
- Lotus.Alpha_Column := Alpha_Column_ID;
-
- end;
-
- (****************************************************************)
-
- Procedure Write_Format_Info; {Could be changed to a single }
- {BlockWrite since format, column}
- {and row are adjacent in the record}
- {definition and on the file.}
- begin
- BlockWrite(Lotus_Write_File, Lotus.Format, 1);
- BlockWrite(Lotus_Write_File, Lotus.Column, 2);
- BlockWrite(Lotus_Write_File, Lotus.Row, 2);
- end;
-
- (****************************************************************)
-
- Procedure Open_Lotus_Read_File;
- begin
- {$I-}
- Assign(Lotus_Read_File,Lotus_Read_File_Name);
- Reset(Lotus_Read_File,1);
- If IoResult <> 0 then
- begin
- ShowMessage('Error opening file ');
- end;
- {$I+}
- Read_Lotus_Record; {Read the first record}
- {If the first record is}
- {not a Version_Type record}
- {then this is not a Lotus File}
- If Lotus.Cell_Type <> Version_Type then
- begin
- ShowMessage('This is not a Lotus File');
- end;
- Lotus_End_Of_File := false;
- end;
-
- (****************************************************************)
-
- Procedure Open_Lotus_Write_File;
- begin
- {$I-}
- Assign(Lotus_Write_File,Lotus_Write_File_Name);
- ReWrite(Lotus_Write_File,1);
- If IoResult <> 0 then
- begin
- ShowMessage('Error opening file '+ Lotus_Write_File_Name);
- end;
- {$I+}
-
- { Automatically write a version type record at the beginning of the file }
- { Lotus_Version is a typed constant set to Version 1.0 or 1A by default }
- { If you have used Open_Lotus_File to read another Lotus file, then it }
- { will have already read the version type record from the input file }
-
- Lotus.Cell_Type_Code := 0;
- Lotus.Cell_Length := 2;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File,Lotus_Version,2);
-
- end;
-
- (****************************************************************)
-
- Procedure Close_Lotus_Read_File;
- begin
- Close(Lotus_Read_File);
- end;
-
- (****************************************************************)
-
- Procedure Close_Lotus_Write_File;
- begin
- { Write an end of file record at the end of the file }
- Lotus.Cell_Type_Code := 1;
- Lotus.Cell_Length := 0;
- Write_Type_and_Length; {End the file with a type 1 record}
- Close(Lotus_Write_File);
- end;
-
- (****************************************************************)
-
- Procedure Get_Version_Name;
- begin
- Case Lotus_Version of
- 1028:
- Lotus_Version_Name := 'Lotus 1-2-3 Version 1.0 or 1A';
- 1029:
- Lotus_Version_Name := 'Symphony Version 1.0';
- 1030:
- Lotus_Version_Name := 'Lotus 1-2-3 Version 2.0, 2.1 or Symphony Version 1.1';
- Else
- Lotus_Version_Name := 'Unidentified';
- end;
- end;
-
- (****************************************************************)
-
- Procedure Read_Lotus_Record;
-
- var
- Alpha_Column_ID : string;
-
- begin
- FillChar(Lotus, SizeOf(Lotus), #0);
- Read_Type_and_Length;
- Case Lotus.Cell_Type_Code of
- 0: begin {Version Record}
- Lotus.Cell_Type := Version_Type;
- BlockRead(Lotus_Read_File, Lotus_Version, 2);
- Get_Version_Name;
- end;
-
- 1: begin {End of File}
- Lotus.Cell_Type := End_Of_File_Type;
- Lotus_End_of_File := True;
- end;
-
- 6: begin {Active Range definition}
- Lotus.Cell_Type := ARange_Type;
- BlockRead(Lotus_Read_File, Lotus.ARange_Start_Column,2);
- BlockRead(Lotus_Read_File, Lotus.ARange_Start_Row,2);
- BlockRead(Lotus_Read_File, Lotus.ARange_End_Column,2);
- BlockRead(Lotus_Read_File, Lotus.ARange_End_Row,2);
- Get_Alpha_Column(Alpha_Column_ID, Lotus.ARange_Start_Column,
- Lotus.ARange_Start_Row);
- Lotus.Alpha_ARange_Start := Alpha_Column_ID;
- Get_Alpha_Column(Alpha_Column_ID, Lotus.ARange_End_Column,
- Lotus.ARange_End_Row);
- Lotus.Alpha_ARange_End := Alpha_Column_ID;
- end;
-
- 8: begin {Column width type}
- Lotus.Cell_Type := Column_Width_Type;
- BlockRead(Lotus_Read_File, Lotus.Column, 2);
- BlockRead(Lotus_Read_File, Lotus.Column_Width,1);
- Get_Alpha_Column(Alpha_Column_ID, Lotus.Column, 0);
- Lotus.Alpha_Column := Alpha_Column_ID;
- end;
-
- 11: begin {Range Name definition}
- Lotus.Cell_Type := Range_Type;
- BlockRead(Lotus_Read_File, Lotus.Range_Name[1],16);
- Lotus.Range_Name[0] := Char(16);
- BlockRead(Lotus_Read_File, Lotus.Range_Start_Column,2);
- BlockRead(Lotus_Read_File, Lotus.Range_Start_Row,2);
- BlockRead(Lotus_Read_File, Lotus.Range_End_Column,2);
- BlockRead(Lotus_Read_File, Lotus.Range_End_Row,2);
- Get_Alpha_Column(Alpha_Column_ID, Lotus.Range_Start_Column,
- Lotus.Range_Start_Row);
- Lotus.Alpha_Range_Start := Alpha_Column_ID;
- Get_Alpha_Column(Alpha_Column_ID, Lotus.Range_End_Column,
- Lotus.Range_End_Row);
- Lotus.Alpha_Range_End := Alpha_Column_ID;
- end;
-
- 12: begin {Blank Record}
- Lotus.Cell_Type := Blank_Type;
- Read_Format_Info;
- end;
-
- 13: begin {Integer}
- Lotus.Cell_Type := Integer_Type;
- Read_Format_Info;
- BlockRead(Lotus_Read_File, Lotus.Integer_Value, 2);
- end;
-
- 14: begin {Real Value}
- Lotus.Cell_Type := Real_Type;
- Read_Format_Info;
- BlockRead(Lotus_Read_File, Lotus.Real_Value, 8);
- end;
-
- 15: begin {Label}
- Lotus.Cell_Type := Label_Type;
- Read_Format_Info;
- If Lotus.Cell_Length > 261 then
- begin
- ShowMessage('Big problem! Label at has length > 255');
- end;
- BlockRead(Lotus_Read_File, Lotus.Formula, Lotus.Formula_Length);
- BlockRead(Lotus_Read_File, Lotus.Label_Value[1], Lotus.Cell_Length - 6);
- Lotus.Label_Value[0] := char(Lotus.Cell_Length - 6);
- BlockRead(Lotus_Read_File, Lotus.Zero, 1);
- end;
-
- 16: begin {Formula}
- Lotus.Cell_Type := Formula_Type;
- Read_Format_Info;
- BlockRead(Lotus_Read_File, Lotus.Formula_Value, 8);
- BlockRead(Lotus_Read_File, Lotus.Formula_Length, 2);
- If Lotus.Formula_Length > 255 then
- begin
- ShowMessage('Big problem! Formula cell has length > 255');
- end;
- BlockRead(Lotus_Read_File, Lotus.Formula, Lotus.Formula_Length);
- end;
-
- 26: begin {Print Range definition}
- Lotus.Cell_Type := PRange_Type;
- BlockRead(Lotus_Read_File, Lotus.PRange_Start_Column,2);
- BlockRead(Lotus_Read_File, Lotus.PRange_Start_Row,2);
- BlockRead(Lotus_Read_File, Lotus.PRange_End_Column,2);
- BlockRead(Lotus_Read_File, Lotus.PRange_End_Row,2);
- Get_Alpha_Column(Alpha_Column_ID, Lotus.PRange_Start_Column,
- Lotus.PRange_Start_Row);
- Lotus.Alpha_PRange_Start := Alpha_Column_ID;
- Get_Alpha_Column(Alpha_Column_ID, Lotus.PRange_End_Column,
- Lotus.PRange_End_Row);
- Lotus.Alpha_PRange_End := Alpha_Column_ID;
- end;
-
- 36: begin {Global Protection Value}
- Lotus.Cell_Type := Protection_Type;
- BlockRead(Lotus_Read_File, Lotus.Protection_Value, 1);
- end;
-
- 39: begin {Print Setup String}
- Lotus.Cell_Type := Print_Setup_Type;
- BlockRead(Lotus_Read_File, Lotus.Print_Setup_Value, 40);
- end;
-
- 40: begin {Print Margins}
- Lotus.Cell_Type := PMargins_Type;
- BlockRead(Lotus_Read_File, Lotus.PMargins_Left, 2);
- BlockRead(Lotus_Read_File, Lotus.PMargins_Right, 2);
- BlockRead(Lotus_Read_File, Lotus.PMargins_Page_Lines, 2);
- BlockRead(Lotus_Read_File, Lotus.PMargins_Top, 2);
- BlockRead(Lotus_Read_File, Lotus.PMargins_Bottom, 2);
- end;
-
-
- Else {Unidentified}
- begin
- Lotus.Cell_Type := Unidentified_Type;
-
- { Use the following line only if you are sure that the length }
- { of the unidentified data type is less than 512 characters. }
- { I the unidentified data cell is more than 512 byte long, }
- { it could cream the program by overwriting code. }
- { The check on cell length protects against this. But, }
- { if you don't know the maximum cell length, the safest }
- { approach is the approach I have taken, just skip the }
- { unknown data cell }
- { }
- { If Lotus.Cell_Length > 512 then }
- { begin }
- { Writeln('Big problem! Cell at row ', Lotus.Row, ' Column ', Lotus.Coulmn, ' has length > 512'); }
- { Halt; }
- { end; }
- { }
- { BlockRead (Lotus_Read_File, Lotus.Unidentified , Lotus.Cell_Length);}
-
-
- { This is the safest way.}
-
- Seek(Lotus_Read_File, FilePos(Lotus_Read_File) + Lotus.Cell_Length);
-
- end;
- end; {CASE}
- end; {PROC}
-
- (****************************************************************)
-
- (****************************************************************)
-
- Procedure Write_Lotus_Record;
-
- begin
- Case Lotus.Cell_Type of
-
- Column_Width_Type:
- begin
- Lotus.Cell_Type_Code := 8;
- Lotus.Cell_Length := 3;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File , Lotus.Column, 2);
- BlockWrite(Lotus_Write_File , Lotus.Column_Width, 1);
- end;
-
- Range_Type:
- begin
- Lotus.Cell_Type_Code := 11;
- Lotus.Cell_Length := 24;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File,Lotus.Range_Name[1], 16);
- BlockWrite(Lotus_Write_File,Lotus.Range_Start_Column,2);
- BlockWrite(Lotus_Write_File,Lotus.Range_Start_Row,2);
- BlockWrite(Lotus_Write_File,Lotus.Range_End_Column,2);
- BlockWrite(Lotus_Write_File,Lotus.Range_End_Row,2);
- end;
-
- PRange_Type:
- begin
- Lotus.Cell_Type_Code := 26;
- Lotus.Cell_Length := 8;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File,Lotus.PRange_Start_Column,2);
- BlockWrite(Lotus_Write_File,Lotus.PRange_Start_Row,2);
- BlockWrite(Lotus_Write_File,Lotus.PRange_End_Column,2);
- BlockWrite(Lotus_Write_File,Lotus.PRange_End_Row,2);
- end;
-
- ARange_Type:
- begin
- Lotus.Cell_Type_Code := 6;
- Lotus.Cell_Length := 8;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File,Lotus.ARange_Start_Column,2);
- BlockWrite(Lotus_Write_File,Lotus.ARange_Start_Row,2);
- BlockWrite(Lotus_Write_File,Lotus.ARange_End_Column,2);
- BlockWrite(Lotus_Write_File,Lotus.ARange_End_Row,2);
- end;
-
- Blank_Type:
- Exit;
-
- Integer_Type:
- begin
- Lotus.Cell_Type_Code := 13;
- Lotus.Cell_Length := 7;
- Write_Type_and_Length;
- Write_Format_Info;
- BlockWrite(Lotus_Write_File,Lotus.Integer_Value,2);
- end;
-
- Real_Type:
- begin
- Lotus.Cell_Type_Code := 14;
- Lotus.Cell_Length := 13;
- Write_Type_and_Length;
- Write_Format_Info;
- BlockWrite(Lotus_Write_File,Lotus.Real_Value,8);
- end;
-
- Label_Type:
- begin
- Lotus.Cell_Type_Code := 15;
- lotus.Cell_Length := 6 + Length(Lotus.Label_Value);
- Lotus.Zero := 0;
- Write_Type_and_Length;
- Write_Format_Info;
- BlockWrite(Lotus_Write_File,Lotus.Label_Value[1],Length(Lotus.Label_Value));
- BlockWrite(Lotus_Write_File,Lotus.Zero, 1);
- end;
-
- Formula_Type: {NOTE: ONLY COPIES OUT THE CURRENT VALUE AS A REAL}
- { If you want to copy the formula then also }
- { BlockWrite Lotus.Formula_Value. }
- { See Read_Lotus_File for how to interpret length }
- { Also, you must change the Cell_Type_Code to 16 }
- {begin
- Lotus.Cell_Type_Code := 14;
- Lotus.Cell_Length := 13;
- Write_Type_and_Length;
- Write_Format_Info;
- BlockWrite(Lotus_Write_File,Lotus.Formula_Value,8);
- end;}
-
- {This version writes a true formula cell}
- begin
- Lotus.Cell_Type_Code := 16;
- Lotus.Cell_Length := 15+Lotus.Formula_Length;
- Write_Type_and_Length;
- Write_Format_Info;
- BlockWrite(Lotus_Write_File,Lotus.Formula_Value,8);
- BlockWrite(Lotus_Write_File,Lotus.Formula_Length,2);
- BlockWrite(Lotus_Write_File,Lotus.Formula,Lotus.Formula_Length);
- end;
-
-
- Protection_Type: begin {Global Protection Value}
- Lotus.Cell_Type_Code := 36;
- Lotus.Cell_Length := 1;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File, Lotus.Protection_Value, 1);
- end;
-
- Print_Setup_Type: begin {Printer Setup String}
- Lotus.Cell_Type_Code := 39;
- Lotus.Cell_Length := 40;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File, Lotus.Print_Setup_Value, 40);
- end;
-
- PMargins_Type: begin {Print Margins String}
- Lotus.Cell_Type_Code := 40;
- Lotus.Cell_Length := 10;
- Write_Type_and_Length;
- BlockWrite(Lotus_Write_File, Lotus.PMargins_Left, 2);
- BlockWrite(Lotus_Write_File, Lotus.PMargins_Right, 2);
- BlockWrite(Lotus_Write_File, Lotus.PMargins_Page_Lines,2);
- BlockWrite(Lotus_Write_File, Lotus.PMargins_Top, 2);
- BlockWrite(Lotus_Write_File, Lotus.PMargins_Bottom, 2);
- end;
-
- Else
- begin
- end;
- end; {CASE}
- end; {PROC}
-
- (****************************************************************)
-
- end.
-